/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.spring.Model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author kerife
 */
@Entity
@Table(name = "fechains")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Fechains.findAll", query = "SELECT f FROM Fechains f"),
    @NamedQuery(name = "Fechains.findByIdFechains", query = "SELECT f FROM Fechains f WHERE f.idFechains = :idFechains"),
    @NamedQuery(name = "Fechains.findByFechains", query = "SELECT f FROM Fechains f WHERE f.fechains = :fechains"),
    @NamedQuery(name = "Fechains.findByHorains", query = "SELECT f FROM Fechains f WHERE f.horains = :horains")})
public class Fechains implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_fechains")
    private Integer idFechains;
    @Column(name = "fechains")
    @Temporal(TemporalType.DATE)
    private Date fechains;
    @Column(name = "horains")
    @Temporal(TemporalType.TIME)
    private Date horains;

    public Fechains() {
    }

    public Fechains(Integer idFechains) {
        this.idFechains = idFechains;
    }

    public Integer getIdFechains() {
        return idFechains;
    }

    public void setIdFechains(Integer idFechains) {
        this.idFechains = idFechains;
    }

    public Date getFechains() {
        return fechains;
    }

    public void setFechains(Date fechains) {
        this.fechains = fechains;
    }

    public Date getHorains() {
        return horains;
    }

    public void setHorains(Date horains) {
        this.horains = horains;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idFechains != null ? idFechains.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fechains)) {
            return false;
        }
        Fechains other = (Fechains) object;
        if ((this.idFechains == null && other.idFechains != null) || (this.idFechains != null && !this.idFechains.equals(other.idFechains))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.Fechains[ idFechains=" + idFechains + " ]";
    }
    
}
